<?php
class db_contact extends  spModel{
	var $pk = "id";
	var $table = "contact";
	
	function getAllGroups(){
		$sql = "select * from contact, detail where contact.del_flag='0' and detail.group_id=contact.id and detail.is_creator='1'";
		return $this->findSql($sql);
	}
}